﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace Models {
    public class ProductInfo {
        public long Id { get; set; }

        [Required, Column("ProductName", TypeName = "nvarchar(20)")]
        public string Name { get; set; }

        [Required, Column("ProductImg", TypeName = "varchar(200)")]
        public string ImgUrl { get; set; }

        [Column("ProductContent", TypeName = "text")]
        public string Content { get; set; }

        [Column("CreateTime", TypeName = "datetime")]
        public DateTime CreateTime { get; set; } = DateTime.Now;

        [Column("ProductPrice", TypeName = "money")]
        public decimal Price { get; set; }
    }
}
